import {
	showConfirm
} from "./common"
import store from "../store"
export const loginTip = () => {
	console.log("校验token")
	console.log(store.getters.token)
	if (!store.getters.token) {
		showConfirm('登录状态已过期，您可以继续留在该页面，或者重新登录?').then(res => {
			if (res.confirm) {
				store.dispatch('LogOut').then(res => {
					uni.reLaunch({
						url: '/pages/login'
					})
				})
			}
		})
	}
}